package service

import (
	"github.com/google/wire"
	"go.manyji.com/lib/encoding/json"
	"sieve_admin_server/app/dao"
	"sieve_admin_server/app/server"
)

var ResourceSet = wire.NewSet(wire.Struct(new(ResourceSrv), "*"))

type ResourceSrv struct {
	WarehouseRepo *dao.WarehouseRepo
}

func (a *ResourceSrv) GetAll(uid int) (interface{}, error) {

	modTree := server.GetModTree(uid)
	return json.Marshal(modTree)
}
